import request from "./request.js";

//获取问卷列表
export const getQuestionList = () => {
	return request({
		method: "get",
		url: "/findExamList",
	});
};

// 获取问卷内容
export const getExamDetails = (params) => {
	return request({
		method: "get",
		url: "/findExamById",
		params
	});
};

// 提交问卷结果
export const postExamData = (data) => {
	return request({
		method: "post",
		url: "/postExamData",
		data
	});
};

// 数据分析结果
export const analyzeData = (params) => {
	return request({
		method: "get",
		url: "/analyze",
		params
	});
};

// 问卷记录
export const getExamRecordList = (params) => {
	return request({
		method: "get",
		url: "/findAllRecordByExamId",
		params
	});
};

//删除记录
export const deleteRecord = (data) => {
	return request({
		method: "post",
		url: "/deleteRecord",
		data
	});
};

//根据学生姓名查询记录
export const queryRecordByFinishYears = (params) => {
	return request({
		method: "get",
		url: "/findRecordByFinishYears",
		params
	});
};

//根据wenquanId查询问卷详情
export const findQuestionInfoByWenquanId = (params) => {
	return request({
		method: "get",
		url: "/findQuestionInfoByWenquanId",
		params
	});
};